This step-by-step tutorial will guide you to build a complete C# application that analyzes 1D barcodes using Visual Studio.
Program.cs |
Copy Code |
---|---|
using System; using System.Drawing; using Accusoft.BarcodeXpressSdk; namespace MyProject { ... |
Program.cs |
Copy Code |
---|---|
using System; using System.Drawing; using Accusoft.BarcodeXpressSdk; namespace MyProject { class Program { static void Main(string[] args) { BarcodeXpress barcodeXpress = new BarcodeXpress(); System.Drawing.Bitmap bitmap = new Bitmap("barcode.bmp"); } } } |
Program.cs |
Copy Code |
---|---|
… namespace MyProject { class Program { static void Main(string[] args) { BarcodeXpress barcodeXpress = new BarcodeXpress(); System.Drawing.Bitmap bitmap = new Bitmap("barcode.bmp"); Accusoft.BarcodeXpressSdk.Result[] results = barcodeXpress.reader.Analyze(bitmap); if (results.Length > 0) { foreach (Accusoft.BarcodeXpressSdk.Result result in results) { Console.WriteLine("{0} : {1}", result.BarcodeType.ToString(), result.BarcodeValue); } } else { Console.WriteLine("No Barcodes Found."); } } } } |
Program.cs |
Copy Code |
---|---|
… namespace MyProject { class Program { static void Main(string[] args) { BarcodeXpress barcodeXpress = new BarcodeXpress(); System.Drawing.Bitmap bitmap = new Bitmap("barcode.bmp"); Accusoft.BarcodeXpressSdk.Result[] results = barcodeXpress.reader.Analyze(bitmap); if (results.Length > 0) { foreach (Accusoft.BarcodeXpressSdk.Result result in results) { Console.WriteLine("{0} : {1}", result.BarcodeType.ToString(), result.BarcodeValue); } } else { Console.WriteLine("No Barcodes Found."); } barcodeXpress.Dispose(); } } } |